package mylab.utils.common;

import lombok.experimental.UtilityClass;

@UtilityClass
public class RandomUtil extends cn.hutool.core.util.RandomUtil {

    public static final String NUMBERS_AND_LETTERS = "0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ";

    public static final String SPECIAL_CHAR = "~!@#$%^&*()-+=_[]{}|?";


    /**
     * 随机字符串，包含大小写字母、阿拉伯数字及特殊符号
     */
    public String randomStringWithSpecial(int length) {
        return randomString(NUMBERS_AND_LETTERS + SPECIAL_CHAR, length);
    }

}
